package com.ala4.oxcafe.repository.mapper;

import com.ala4.oxcafe.entity.DeptInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * 部门信息
 *
 * @author PING
 * @version 1.0.0
 * @date 2025/8/12 12:44
 */
public interface DeptInfoMapper extends BaseMapper<DeptInfo> {


    @Select("SELECT max(id) FROM dept_info t " +
            "where t.parent_id = #{parentId} and t.del_flag in (0,1)")
    Long selectMaxIdDept(Long parentId);
}
